package game;


import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.UnicodeFont;


/**
 * Angezeigtes GUI während eines laufenden Spiels.
 * 
 * @author mariuswi
 */
public class GuiPlay {
    
    //Faktor zur Umrechnung von der Arenagröße auf die gezeichnete Größe
    static float XFACTOR;
    static float YFACTOR;

    //Attribute
    private int screenHeight;
    private int screenWidth;

    //Methoden
    public GuiPlay() throws SlickException {
    }
    
    public void setScreen(AppGameContainer app, int arenaWidth, int arenaHeight) throws SlickException{
        this.screenHeight = 700;
        this.screenWidth = 700;
        app.setDisplayMode(screenWidth, screenHeight, false);
        this.XFACTOR = (float)screenWidth/(float)arenaWidth;
        this.YFACTOR = (float)screenHeight/(float)arenaHeight;
        
    }
   
    /**
     * Rendert das Hauptspiel
     * 
     * @param container
     * @param g 
     */
    public void render(GameContainer container, Graphics g, Drawable[] draw) throws SlickException{       
             
        for(int i = 0; i<draw.length;i++){
            draw[i].draw(container, g);
        }
    }
}
